package com.zm.duotai2;

public class MyPhone implements CameraPhone {
    String name;
    CameraPhone phone;

    public MyPhone(String name, CameraPhone phone) {
        this.name=name;
        this.phone = phone;
    }
    @Override
    public void takePhoto() {
        System.out.print(name+"正在使用");
      phone.takePhoto();
    }

    @Override
    public void call() {
        System.out.print(name+"正在使用");
       phone.call();
    }

    @Override
    public void receive() {
        System.out.print(name+"正在使用");
       phone.receive();
    }

    @Override
    public void sendMessage() {
        System.out.print(name+"正在使用");
       phone.sendMessage();
    }

    @Override
    public void receciveMsg() {
        System.out.print(name+"正在使用");
        phone.receciveMsg();
    }
    public void myCall(){
        this.call();
    }
}
